﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>首页</title>
    <link href="/Content/Site.css" rel="stylesheet" />
    <link href="/Content/my.css" rel="stylesheet" />
    <script src="/Scripts/respond.js"></script>
    <script src="/Scripts/modernizr-2.6.2.js"></script>
    <link href="/Content/Site.css" rel="stylesheet" />
    <script src="/Scripts/jquery-1.10.2.js"></script>
    <script src="/Scripts/angular.js"></script>
</head>
<body ng-app="myApp" ng-controller="userCtrl">
    <!--头信息-->
    <DIV class="clearfloat" id="header">
        <DIV id="header_l">
            <DIV class="fl" id="logo">
                <A title="" href="/">
                    <IMG alt=""
                         src="../../Content/logo.png">
                </A>
            </DIV>
            <DIV class="ad-pc" style="float: right;">
                头部广告ddddddddddddddddd
            </DIV>
        </DIV>

    </DIV>

    <!--菜单-->
    <DIV class="nav head-nav avt clearfloat">
        <LI><A href="/">首页</A></LI>
        <LI class="cat-item cat-item-1 current-cat"><A href="/movies/">最新更新</A></LI>
        <LI ng-repeat="category in categorys"><A href="/category/{{category.CategoryUrl}}">{{category.CategoryName}}</A></LI>

    </DIV>

    <DIV class="clearfloat" id="page">
        <DIV id="center">
            {$body$}
        </DIV>

        <DIV id="left">

            <H2>电影标签</H2>
            <UL>
                <LI ng-repeat="tag in tags"><A href="/tag/{{tag.TagUrl}}/">{{tag.TagName}}</A></LI>
            </UL>

        </DIV>

        <DIV id="right">
            <form target="_blank" class="ng-pristine ng-valid">
                <input type="hidden" autocomplete="off">
                <input name="code" class="feed-mail-input" id="code" onfocus="if(this.value=='请输入关键词') this.value='';" onblur="if(this.value=='') this.value='请输入关键词';" type="text" value="请输入关键词">
                <input class="feed-mail-btnbd" id="searchsubmit" type="button" onclick="search()" value="百度搜索">
            </form>
            <script>
                function search() {
                    var searchUrl = "/search/" + document.getElementById("code").value;
                    window.open(searchUrl);
                }
            </script>
            <DIV class="listad">
                右边的广告1
            </DIV>
            <DIV class="list">
                <H3>热门电影推荐</H3>
                <iframe width="100%" height="595" frameborder="0" scrolling="no" src="/Hot/"></iframe>
            </DIV>
            <DIV class="listad">
                右边的广告2
            </DIV>
            <DIV class="list">
                <H3>本周热评文章</H3>
                <UL class="ds-top-threads" data-num-items="10" data-range="weekly"></UL>
            </DIV>
            <DIV class="listad">
                右边的广告3
            </DIV>
            <DIV class="list">
                <H3>最新评论列表</H3>
                <UL class="ds-recent-comments" data-num-items="6" data-excerpt-length="70"
                    data-show-admin="1" data-show-title="0" data-show-time="1"
                    data-show-avatars="1"></UL>
            </DIV>
            <DIV class="listad">
                右边的广告4
            </DIV>
        </DIV>

        <DIV class="ad-pc">
            底部广告位置!!!
            底部广告位置!!!
            底部广告位置!!!
            底部广告位置!!!
            底部广告位置!!!
        </DIV>
    </DIV>

    <script>
        angular.module('myApp', []).controller('userCtrl', function ($scope, $http) {
            $http.get("/api/Tag/GetAll").then(
                function (response) {
                    $scope.tags = response.data;
                });
            $http.get("/api/Category/GetAll").then(
               function (response) {
                   $scope.categorys = response.data;
               });
        })
    </script>
</body>
</html>